/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sporejava;

/**
 *
 * @author Exodus
 */
public abstract class EtreVivant extends Espece {

    private int identifiant;
    private String ADN;
    private int age;
    private int sante;
    private int[] position;
    private int tempsReproduction;

    public EtreVivant(String nom, String baseAdn, int identifiant, String ADN,  int[] position) {
        super(nom, baseAdn);
        this.identifiant = identifiant;
        this.ADN = ADN;
        this.age = 0;
        this.sante = 100;
        this.position = position;
        this.tempsReproduction = 3;
    }

    public void setADN(String ADN) {
        this.ADN = ADN;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setIdentifiant(int identifiant) {
        this.identifiant = identifiant;
    }

    public void setPosition(int[] position) {
        this.position = position;
    }

    public void setSante(int sante) {
        this.sante = sante;
    }

    public String getADN() {
        return ADN;
    }

    public int getAge() {
        return age;
    }

    public int getIdentifiant() {
        return identifiant;
    }

    public int[] getPosition() {
        return position;
    }

    public int getSante() {
        return sante;
    }
    
    
    public int getTempsReproduction(){
        return this.tempsReproduction;
    }
    
    public void setTempsReproduction(int tps){
        this.tempsReproduction = tps;
    }
    
    public abstract EtreVivant reproduction(EtreVivant e);
    public void afficherEtreVivant(){
        System.out.print("ID : " + this.getIdentifiant() + " - Espèce :" +this.getNomEspece() + " - Age : " + this.getAge() + " - Santé : "+this.getSante() + "/100 - Position : ("+ this.position[0]+","+this.position[1]+")");
        
    }
}
